* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #050917 0%, #181d23aa 100%);
            min-height: 100vh;
            color: #333;
            overflow-x: hidden;
            position: relative;
        }


        /* ===== HEADER AND NAVIGATION STYLES ===== */
header {
    background: linear-gradient(135deg, #1e29390e 0%, #2529340c 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0px; 
    z-index: 1000;
    -webkit-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}
header.header-solid {
    background: linear-gradient(135deg, #1e2939 0%, #252934 100%);
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

/* Navigation styles */
nav {
    position: relative;
}

nav ul {
    list-style: none;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 25px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 10px 15px;
    border-radius: 5px;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a:hover,
nav ul li a:focus {
    background-color: rgba(255, 255, 255, 0.2);
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
    outline: none;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    -webkit-transition: background-color 0.3s ease;
    -moz-transition: background-color 0.3s ease;
    -o-transition: background-color 0.3s ease;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}


/* Mobile styles - Step 5: 768px breakpoint */
@media screen and (max-width: 768px) {
    /* Mobile navigation */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        -webkit-transform: translateY(-50%);
        -moz-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
        transform: translateY(-50%);
    }
    
    nav ul {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -moz-box-orient: vertical;
        -moz-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #050917 0%, #181d23aa 100%);
        -webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        -moz-box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        display: none;
        padding: 20px 0;
    }
    
    nav ul.active {
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    nav ul li a {
        display: block;
        padding: 15px 20px;
        text-align: center;
        border-radius: 0;
    }
    
}

.navigation-logo {
    position: fixed;
    top: 1.2rem;
    left: 2rem;
    height: 48px;
    z-index: 10;
    transition: filter 0.2s;
}

.navigation-logo:hover {
    filter: brightness(0.8);
}

.site-logo {
    height: 40px;
    transition: filter 0.2s, opacity 0.2s;
    position: fixed;
    top: 0.6rem;
    left: 2rem;
    max-width: 160px; /* обмеження по ширині, якщо потрібно */
}





        /* ===== ANIMATED BACKGROUND AND PARTICLES ===== */

        .animated-bg {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            background: linear-gradient(135deg, #050917 0%, #202736 100%);
            transition: all 0.3s ease;
        }

        .animated-bg::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                rgba(255, 255, 255, 0.1) 0%, 
                rgba(255, 255, 255, 0.05) 30%, 
                transparent 70%);
            transition: all 0.3s ease;
        }

        .floating-particles {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            pointer-events: none;
        }

        .particle {
            position: absolute;
            width: 4px;
            height: 4px;
            background: rgba(255, 255, 255, 0.6);
            border-radius: 50%;
            animation: float 6s ease-in-out infinite;
        }

        .particle:nth-child(odd) {
            animation-duration: 8s;
            animation-delay: -2s;
        }

        .particle:nth-child(even) {
            animation-duration: 10s;
            animation-delay: -4s;
        }

        @keyframes float {
            0%, 100% { 
                transform: translateY(0) translateX(0) scale(1);
                opacity: 0.6;
            }
            25% { 
                transform: translateY(-20px) translateX(10px) scale(1.2);
                opacity: 0.8;
            }
            50% { 
                transform: translateY(-10px) translateX(-5px) scale(0.8);
                opacity: 0.4;
            }
            75% { 
                transform: translateY(-30px) translateX(15px) scale(1.1);
                opacity: 0.7;
            }
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 20px;
        }

        .header-content {
            text-align: center;
            margin-bottom: 3rem;
            color: white;
            padding-top: 60px;
        }

        .header-img {
            width: 100%;
            height: 200px;
            margin: 0 auto;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            animation: fadeInDown 1s ease-out;
            
            overflow: hidden;
        }

         .header-img img {
        
            width: 100%; /* Автоматична висота, щоб зберегти пропорції */
            height: 100%; /* Автоматична висота, щоб зберегти пропорції */
            object-fit: cover; /* Зберігаємо пропорції зображення */
         }

        .header-content h1 {
            color: #0092FF;
            font-size: 3rem;
            margin-bottom: 1rem;
            text-shadow: 0 4px 8px rgba(0,0,0,0.3);
            animation: fadeInDown 1s ease-out;
            top: 60px;
        }

        .header-content p {
            font-size: 1.2rem;
            opacity: 0.9;
            animation: fadeInUp 1s ease-out 0.3s both;
        }

        .filters {
            display: flex;
            justify-content: center;
            margin-bottom: 3rem;
            flex-wrap: wrap;
            gap: 1rem;
            animation: fadeInUp 1s ease-out 0.6s both;
        }

        .filter-btn {
            padding: 0.8rem 1.5rem;
            background: rgba(4, 0, 57, 0.242);
            border: 1px solid rgba(197, 183, 59, 0.745);
            border-radius: 5px;
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            font-weight: 500;
        }

        .filter-btn:hover {
            background: #ed1c23b1;
            border-color: rgba(197, 183, 59, 0.745);
            transform: translateY(-2px);
             box-shadow: 0 8px 25px rgba(128, 255, 244, 0.906);
            
        }

        .filter-btn.active {
            background: linear-gradient(90deg, #ED1C24 0%, lch(63.44% 56.92 270.44) 10%, #0d4eff 100% );
            border-color: transparent;
            box-shadow: 0 8px 25px rgba(128, 255, 244, 0.906);
        }

        .portfolio-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 2rem;
            margin-bottom: 3rem;
        }

        .portfolio-card {
            height: 450px;
            position: relative;
            background: linear-gradient(135deg, #050816, #0e101441);
            border-radius: 15px;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(197, 183, 59, 0.745);
            opacity: 0;
            transform: translateY(50px) scale(0.9);
            animation: cardFadeIn 0.6s ease-out forwards;
        }

        .portfolio-card:nth-child(odd) {
            animation-delay: 0.1s;
        }

        .portfolio-card:nth-child(even) {
            animation-delay: 0.2s;
        }

        .portfolio-card.hidden {
            opacity: 0;
            transform: translateY(50px) scale(0.8);
            pointer-events: none;
            height: 0;
            margin: 0;
            overflow: hidden;
        }

        .portfolio-card:hover {
            transform: translateY(-15px) scale(1.02);
            border: 2px solid rgba(197, 183, 59, 0.879);
            box-shadow: 0 25px 50px rgba(128, 255, 244, 0.906);
            
        }

    .card-link {
        height: 100%;
            width: 100%;
            padding: 0.9rem;
            border-radius: 10px;
            background: linear-gradient(135deg, #050816, #0e1014ac);
            position: relative;
            overflow: hidden;
    }

        .card-image {
            height: 100%;
            width: 100%;
            padding: 0.9rem;
            border-radius: 10px;
            background: linear-gradient(135deg, #050816, #0e1014ac);
            position: relative;
            overflow: hidden;
        }


        .card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.299); /* Затінення */
    transition: background 0.4s;
    z-index: 2;
    pointer-events: none;
}

.portfolio-card:hover .card-image::after {
    background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, 0.148) 0%, rgba(255, 255, 255, 0.062) 60%, rgba(0, 0, 0, 0) 100%);
}

        .card-image img {
           
            height: 100%; /* Автоматична висота, щоб зберегти пропорції */
            position: absolute; /* Абсолютне позиціонування */
            top: 50%; /* Вирівнюємо по вертикалі */
            left: 50%; /* Вирівнюємо по горизонталі */
            transform: translate(-50%, -50%); /* Центруємо зображення */
            
}

        .card-image::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 150%;
            height: 100%;
            background: linear-gradient(45deg, transparent 30%,  rgba(128, 255, 244, 0.404) 50%, transparent 70%);
            transform: translateX(-100%);
            transition: transform 0.6s ease;
        }

        .portfolio-card:hover .card-image::before {
            transform: translateX(100%);
        }

        .card-icon {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 3rem;
            color: white;
            opacity: 0.8;
            transition: all 0.3s ease;
        }

        .portfolio-card:hover .card-icon {
            transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
            opacity: 1;
        }

        .card-content {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0rem; /* або скільки потрібно над категорією */
            opacity: 0;
            transition: opacity 0.3s, bottom 0.3s;
            pointer-events: none;
            z-index: 2;
            display: flex;
            flex-direction: column;
            align-items: stretch;
}

        /* Показуємо контент при наведенні на картку */
.portfolio-card:hover .card-content {
    opacity: 1;
    pointer-events: auto;
}


.card-content-wrapper {
    background: linear-gradient(to bottom, rgba(45, 45, 58, 0.635) 0%, rgba(19, 19, 38, 0.831) 30%, rgb(13, 13, 30) 50%, rgb(0, 0, 0) 100%);
    padding: 1rem;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 2;
}



.portfolio-card:hover .card-description {
    bottom: 2.2rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ED1C24;
    transition: color 0.3s ease;
    display: inline-block; /* Important for height calculation */
    position: relative;
    z-index: 3;
}

.portfolio-card:hover .card-title {
    color: #0092FF;
}
.portfolio-card:hover .card-title {
    bottom: 2.0rem;
    padding-top: 1rem;
}

.card-description {
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0;
    padding-bottom: 1rem;
    width: 100%;
    position: relative;
    z-index: 3;
}

/* Category tag кнопка на картках*/
.card-category {
    position: absolute; /* Позиціонуємо кнопку абсолютно */
    bottom: 1rem; /* Відступ від нижнього краю картки */
    left: 5%; /* Вирівнюємо по центру */
    transform: translateX(0%); /* Корегуємо вирівнювання */
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(45deg, #0092FF, #0091ffc2);
    color: rgb(250, 250, 250);
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}


.card-category:hover {
    background: linear-gradient(45deg, #ED1C24, #ED1C24c2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
        .stats {
            display: flex;
            justify-content: center;
            gap: 2rem;
            margin-top: 3rem;
            animation: fadeInUp 1s ease-out 0.9s both;
        }

        .stat-item {
            text-align: center;
            color: white;
            padding: 1rem;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            backdrop-filter: blur(10px);
            transition: transform 0.3s ease;
        }

        .stat-item:hover {
            transform: translateY(-5px);
        }

        .stat-number {
            font-size: 2rem;
            font-weight: bold;
            display: block;
            margin-bottom: 0.5rem;
        }

        @keyframes fadeInDown {
            from { opacity: 0; transform: translateY(-50px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(50px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes cardFadeIn {
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        @media (max-width: 768px) {
            .container { padding: 1rem; }
            .header-content h1 { font-size: 2rem; }
            .filters { gap: 0.5rem; }
            .filter-btn { padding: 0.6rem 1rem; font-size: 0.9rem; }
            .stats { flex-direction: column; gap: 1rem; }
        }
  /* ===== PORTFOLIO STYLES ===== */  
.page-btn {
    
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 30px;
}

 .show-more-btn {
    justify-content: center;
    
    height: 40px;
    border-radius: 30px;
}

.arrow-btn {
  background: #222;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.7em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.arrow-btn:hover, .arrow-btn:focus {
  background: #fff;
  color: #222;
  outline: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.arrow-btn:disabled {
  background: #aaa;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.6;
}




/* ===== FOOTER STYLES ===== */

        footer {
    background: linear-gradient(90deg, #050816 0%, #0e1014 100%);
    color: #fff;
    padding: 2rem 0 1rem 0;
    text-align: center;
    border-top: 1px solid rgba(197, 183, 59, 0.3);
    margin-top: 3rem;
    font-size: 1rem;
    letter-spacing: 0.03em;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

footer p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.85;
}

footer .social-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

footer .social-links li a {
    color: #ED1C24;
    background: rgba(255,255,255,0.08);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px 0 rgba(128,255,244,0.08);
}

footer .social-links li a:hover {
    background: linear-gradient(90deg, #ED1C24 0%, #0d4eff 100%);
    color: #fff;
    box-shadow: 0 4px 16px 0 rgba(128,255,244,0.18);
}





/* Модальне вікно */
#modal {
  
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.85);
  display: none; /* Сховане за замовчуванням */
  align-items: center;
  justify-content: center;

}
  

/* Картинка по центру */
#modal-img {
  max-width: 80vw;
  max-height: 80vh;
  display: block;
  margin: 0;
  box-shadow: 0 0 30px #000a;
  border-radius: 12px;
}

/* Кнопки навігації */
#modal-prev, #modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30,30,30,0.7);
  color: #fff;
  border: none;
  font-size: 2.5rem;
  padding: 0.5em 0.9em;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10001;
  user-select: none;
 
  
 
}
#modal-prev:hover, #modal-next:hover {
  background: #fff;
  color: #222;
}
#modal-prev { left: 2vw; }
#modal-next { right: 2vw; }

/* Кнопка закриття */
#modal-close {
  position: absolute;
  top: 2vh;
  right: 3vw;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  z-index: 10002;
  background: none;
  border: none;
  transition: color 0.2s;

}
  
#modal-close:hover {
  color: #ff5252;
}